/**
 * 
 */
package qy.jalgotrade.broker;

/**
 * <pre>
 * Base class for stop orders.
 * 
 * .. note::
 * 
 *     This is a base class and should not be used directly.
 * </pre>
 * 
 * @author c-geo
 *
 */
public abstract class StopOrder extends Order {

	private double __stopPrice;

	/**
	 * 
	 * @param action
	 * @param instrument
	 * @param stopPrice
	 * @param quantity
	 * @param instrumentTraits
	 * @throws Exception
	 */
	public StopOrder(Action action, String instrument, double stopPrice, double quantity,
                     InstrumentTraits instrumentTraits) throws Exception {

		super(Type.STOP, action, instrument, quantity, instrumentTraits);
		__stopPrice = stopPrice;
	}

	/**
	 * Returns the stop price.
	 * 
	 * @return
	 */
	public double getStopPrice() {

		return __stopPrice;
	}
}
